/*
 * @lc app=leetcode.cn id=1550 lang=typescript
 *
 * [1550] 存在连续三个奇数的数组
 */

// @lc code=start
function threeConsecutiveOdds(arr: number[]): boolean {
    let count = 0;
    return arr.some((i) => {
        if (i % 2) {
            count++;
        } else {
            count = 0;
        }
        return count === 3;
    });
}
// @lc code=end
